package com.wink_172;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import com.wink_172.commons.R;
import com.wink_172.library.AppManager;
import com.wink_172.library.LibManager;
import com.wink_172.library.model.json.SendBodyParameter;
import com.wink_172.library.utils.CommonUtils;
import com.wink_172.library.utils.DisplayUtil;
import com.wink_172.library.view.CustomEditText;
import com.wink_172.library.view.CustomToast;

import org.xutils.http.HttpMethod;
import org.xutils.http.RequestParams;
import org.xutils.x;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_main);


        CustomToast.showToast(this, "123456");
//        AppManager.getAppManager().addActivity();
//        LibManager.initLibManager(this).getXutilsInstance().



        /**一个网络请求标准例子*/
        RequestParams params = CommonUtils.commonRequestParams("url");
        SendBodyParameter sendBody = new SendBodyParameter();
        List<String> images = new ArrayList<>();
        sendBody.setTitle("标题");
        images.add("test");
        sendBody.setImages(images);
        params.setBodyContent(JSON.toJSONString(sendBody));

        x.http().request(HttpMethod.PUT, params, null);
    }
}